<?php 

header("Content-type: text/xml"); 


include("config.php");

$query="SELECT * FROM gallery order by added desc";
$result=mysql_query($query);

$num=mysql_numrows($result);


echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
echo '<url>
		<loc>http://www.perfect-beauties.com/</loc>
		<lastmod>'.date("Y-m-d").'</lastmod>
		<changefreq>daily</changefreq>
		<priority>0.9</priority>
	  </url>';

echo '<url>
		<loc>http://www.perfect-beauties.com/list.php</loc>
		<lastmod>'.date("Y-m-d").'</lastmod>
		<changefreq>daily</changefreq>
		<priority>0.8</priority>
	  </url>';




$i=0;
while ($i < $num) {

	$id=mysql_result($result,$i,"id");
	
	echo '<url>
		<loc>http://www.'.$domain.'/show-'.$id.'</loc>
		<lastmod>'.date("Y-m-d").'</lastmod>
		<changefreq>never</changefreq>
		<priority>0.5</priority>
	  </url>';
	
	$i++;
}

echo '</urlset>';

mysql_close();

?>